<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="keyword" content="">
    <!-- <link rel="shortcut icon" href="img/favicon.png"> -->
    <title>问题单审查</title>
    <!-- <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"> -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
    <link rel="stylesheet" href="css/style.css">
    <style type="text/css">
        .weui-label{width: 130px;}
    </style>
</head>

<body>
    <form action="" class="page">
        <div class="weui-cells__title">审查意见</div>
        <div class="weui-cells">
            <div class="weui-cell">
                <div class="weui-cell__bd">
                    <textarea name="content" id="" rows="4" class="weui-textarea" placeholder="请输入审查意见" required></textarea>
                </div>
            </div>
        </div>
        <div class="weui-cells__title">处理结果</div>
        <div class="weui-cells weui-cells_radio">
            <label for="radio-pass" class="weui-cell weui-check__label">
                <div class="weui-cell__bd">
                    <p>通过</p>
                </div>
                <span class="weui-cell__ft">
                    <input type="radio" class="weui-check" name="result" id="radio-pass">
                    <span class="weui-icon-checked"></span>
                </span>
            </label>
            <label for="radio-back" class="weui-cell weui-check__label">
                <div class="weui-cell__bd">
                    <p>返回</p>
                </div>
                <span class="weui-cell__ft">
                    <input type="radio" class="weui-check" name="result" id="radio-back" checked>
                    <span class="weui-icon-checked"></span>
                </span>
            </label>
        </div>
        <div class="weui-cells__title"></div>
        <div class="weui-cells weui-cells_radio">
            <div class="weui-cell">
                <div class="weui-cell__bd">是否修改任务内容</div>
                <div class="weui-cell__ft">
                    <label for="switchModify" class="weui-switch-cp">
                        <input id="switchModify" class="weui-switch-cp__input" type="checkbox" checked="checked"/>
                        <div class="weui-switch-cp__box"></div>
                    </label>
                </div>
            </div>
        </div>
        <div id="modify-area" style="display: none;">
            <div class="weui-cells__title">任务内容</div>
            <div class="weui-cells">
                <div class="weui-cell">
                    <div class="weui-cell__bd">
                        <textarea name="" id="" rows="4" class="weui-textarea" placeholder="请输入任务内容"></textarea>
                    </div>
                </div>
            </div>
            <div class="weui-cells__title"></div>
            <div class="weui-cells">
                <div class="weui-cell">
                    <div class="weui-cell__hd">
                        <label for="" class="weui-label">负责人</label>
                    </div>
                    <div class="weui-cell__bd">
                        <input type="text" class="weui-input" value="陈瑾" disabled>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd">
                        <label for="" class="weui-label">计划完成时间</label>
                    </div>
                    <div class="weui-cell__bd">
                        <input type="text" class="weui-input" value="2017-05-12" disabled>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd">
                        <label for="" class="weui-label">是否修改SD报告</label>
                    </div>
                    <div class="weui-cell__bd">
                        <input type="text" class="weui-input" value="否" disabled>
                    </div>
                </div>
            </div>
        </div>
        <div class="weui-btn-area">
            <button class="weui-btn weui-btn_primary">修改并提交</button>
        </div>
    </form>
    <div class="weui-footer">
        <p class="weui-footer__text">Copyright &copy; 2016-2017 宙能信息. All rights reserved.</p>
    </div>
    <!--BEGIN toast-->
    <div id="toast" style="display: none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast">
            <i class="weui-icon-success-no-circle weui-icon_toast"></i>
            <p class="weui-toast__content">审查成功</p>
        </div>
    </div>
    <!-- loading toast -->
    <div id="loadingToast" style="display:none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast">
            <i class="weui-loading weui-icon_toast"></i>
            <p class="weui-toast__content">审查中&hellip;</p>
        </div>
    </div>
    <!-- <script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script> -->
    <!-- <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> -->
    <script src="https://cdn.bootcss.com/zepto/1.2.0/zepto.min.js"></script>
    <script>
    (function($) {
        var modifyArea = $('#modify-area'),
            $toast = $('#toast'),
            $loadingToast = $('#loadingToast');

        $('#switchModify').on('change', function () {
            modifyArea.css('display', $(this).prop('checked') ? 'block' : 'none');
        }).trigger('change');

        $('form').on('submit', function (e) {
            e.preventDefault();

            if ($loadingToast.css('display') != 'none') return;

            $loadingToast.show();
            // ajax submit
            setTimeout(function () {
                $loadingToast.hide();
                if ($toast.css('display') != 'none') return;

                $toast.show();
                setTimeout(function () {
                    $toast.hide();
                    history.back();
                }, 1000);
            }, 2000);
        });
    })(Zepto);
    </script>
</body>

</html>
